using UnityEngine;

public class SPR_Toned_SetFilteredColors : MonoBehaviour
{
	[SerializeField]
	private SpriteRenderer targetRenderer;

	[SerializeField]
	private Color[] filteredColors = new Color[8];

	private void Awake()
	{
		if (filteredColors.Length != 8)
		{
			Debug.LogError("The filteredColors array must contain exactly 8 colors.");
			return;
		}
		targetRenderer.material.SetColor("_FilteredColor1", filteredColors[0]);
		targetRenderer.material.SetColor("_FilteredColor2", filteredColors[1]);
		targetRenderer.material.SetColor("_FilteredColor3", filteredColors[2]);
		targetRenderer.material.SetColor("_FilteredColor4", filteredColors[3]);
		targetRenderer.material.SetColor("_FilteredColor5", filteredColors[4]);
		targetRenderer.material.SetColor("_FilteredColor6", filteredColors[5]);
		targetRenderer.material.SetColor("_FilteredColor7", filteredColors[6]);
		targetRenderer.material.SetColor("_FilteredColor8", filteredColors[7]);
	}
}
